import request from '@/utils/request'

// 查询危险作业类型列表
export function listDangerous(query) {
  return request({
    url: '/mag/dangerous/list',
    method: 'get',
    params: query
  })
}

// 查询危险作业类型详细
export function getDangerous(id) {
  return request({
    url: '/mag/dangerous/' + id,
    method: 'get'
  })
}

// 新增危险作业类型
export function addDangerous(data) {
  return request({
    url: '/mag/dangerous',
    method: 'post',
    data: data
  })
}

// 修改危险作业类型
export function updateDangerous(data) {
  return request({
    url: '/mag/dangerous',
    method: 'put',
    data: data
  })
}

// 删除危险作业类型
export function delDangerous(id) {
  return request({
    url: '/mag/dangerous/' + id,
    method: 'delete'
  })
}
